package teatime.core.model.entity.base;

import java.io.Serializable;


public abstract class BaseStatusDetailPK implements Serializable {

	protected int hashCode = Integer.MIN_VALUE;

	private java.lang.String statusDetailId;
	private java.lang.String statusId;


	public BaseStatusDetailPK () {}
	
	public BaseStatusDetailPK (
		java.lang.String statusDetailId,
		java.lang.String statusId) {

		this.setStatusDetailId(statusDetailId);
		this.setStatusId(statusId);
	}


	/**
	 * Return the value associated with the column: STATUS_DETAIL_ID
	 */
	public java.lang.String getStatusDetailId () {
		return statusDetailId;
	}

	/**
	 * Set the value related to the column: STATUS_DETAIL_ID
	 * @param statusDetailId the STATUS_DETAIL_ID value
	 */
	public void setStatusDetailId (java.lang.String statusDetailId) {
		this.statusDetailId = statusDetailId;
	}



	/**
	 * Return the value associated with the column: STATUS_ID
	 */
	public java.lang.String getStatusId () {
		return statusId;
	}

	/**
	 * Set the value related to the column: STATUS_ID
	 * @param statusId the STATUS_ID value
	 */
	public void setStatusId (java.lang.String statusId) {
		this.statusId = statusId;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof teatime.core.model.entity.StatusDetailPK)) return false;
		else {
			teatime.core.model.entity.StatusDetailPK mObj = (teatime.core.model.entity.StatusDetailPK) obj;
			if (null != this.getStatusDetailId() && null != mObj.getStatusDetailId()) {
				if (!this.getStatusDetailId().equals(mObj.getStatusDetailId())) {
					return false;
				}
			}
			else {
				return false;
			}
			if (null != this.getStatusId() && null != mObj.getStatusId()) {
				if (!this.getStatusId().equals(mObj.getStatusId())) {
					return false;
				}
			}
			else {
				return false;
			}
			return true;
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			StringBuilder sb = new StringBuilder();
			if (null != this.getStatusDetailId()) {
				sb.append(this.getStatusDetailId().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			if (null != this.getStatusId()) {
				sb.append(this.getStatusId().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			this.hashCode = sb.toString().hashCode();
		}
		return this.hashCode;
	}


}